#include <iostream>
#include<stdlib.h>
#include<time.h>
#include "doubleCircleList.h"
using namespace doubleList;
int main() {
    //设置随机数种子
    srand(time(NULL));
    //创建一个循环链表
    const doubleCircleList list;
    for (int i = 0;i<10;i++) {
        list.insert_back(rand()%100);
    }
    list.insert_front(200);
    list.insert_back(400);
    list.insert_back(300);
    list.insert_back(200);
    list.insert_back(200);
    list.showList();
    list.deleteNode(200);
    std::cout<<list.find(200)<<std::endl;
    list.showList();
    list.deleteNode(300);
    list.showList();
    list.deleteNode(400);
    list.showList();

    list.deleteAllNode(200);
    list.showList();
    iterator it =list.begin();
    while (it!=list.end()) {
        std::cout<<*it<<" ";
        ++it;
    }
    return 0;
}